package com.logic.comment.util;

import lombok.Data;

/**
 * 消息数据封装类
 */
@Data
public class CodeResult<T> {

    private  Integer code;

    private T data;

    public CodeResult() {

    }

    public CodeResult(Integer code, T data) {
        this.code = code;
        this.data = data;
    }

    public static <T> CodeResult<T> success(Integer code,T data) {
        return new CodeResult<>(code,data);
    }
}
